package com.sky.mapper;

import com.sky.entity.ShoppingCart;

import java.util.List;

public interface ShoppingCartMapper {
    /**
     * 查询是否存在购物车记录
     * @param shoppingCart
     * @return
     */
    List<ShoppingCart> getBy(ShoppingCart shoppingCart);

    /**
     * 增加商品数量
     * @param cart
     */
    void update(ShoppingCart cart);

    /**
     * 添加购物车数据
     * @param shoppingCart
     */
    void insert(ShoppingCart shoppingCart);

    /**
     * 清空购物车
     */
    void delete(ShoppingCart shoppingCart);
    /**
     * 批量插入购物车数据
     * @param shoppingCartList
     */
    void insertBatch(List<ShoppingCart> shoppingCartList);
}
